from impala.dbapi import connect


def demo():
    conn = connect(host='192.168.0.172', port=8888, user=None, password=None, database='default',
                   auth_mechanism="PLAIN")
    cur = conn.cursor()
    cur.execute("select deviceid,data_time,frequency,datatype from devicedata where deviceid = '200006287'  and "
                "data_time>= '2022-03-20 00:00:00' and data_time<= '2022-03-21 00:00:00' limit 100")
    data = cur.fetchall()
    print(data)
    return data


temp = {"a": 1, "device_id": 2}
